<!--
  Expects the following variables:
  volumes
  namespace
 -->
<div ng-repeat="volume in volumes">
  <h5 style="margin-bottom:0;">{{volume.name}}</h5>
  <dl class="dl-horizontal left">
    <div ng-if="volume.secret">
      <dt>Type:</dt>
      <dd>secret</dd>
      <dt>Secret name:</dt>
      <dd>{{volume.secret.secretName}}</dd>
    </div>
    <div ng-if="volume.persistentVolumeClaim">
      <dt>Type:</dt>
      <dd>persistent volume claim</dd>
      <dt>Claim name:</dt>
      <dd><a ng-href="{{volume.persistentVolumeClaim.claimName | navigateResourceURL : 'PersistentVolumeClaim' : namespace}}">{{volume.persistentVolumeClaim.claimName}}</a></dd>
      <dt>Mode:</dt>
      <dd>
        <span ng-if="volume.persistentVolumeClaim.readOnly">read-only</span>
        <span ng-if="!volume.persistentVolumeClaim.readOnly">read-write</span>
      </dd>
    </div>
    <div ng-if="volume.hostPath">
      <dt>Type:</dt>
      <dd>host path</dd>
      <dt>Path:</dt>
      <dd>{{volume.hostPath.path}}</dd>
    </div>
    <div ng-if="volume.emptyDir">
      <dt>Type:</dt>
      <dd>empty dir</dd>
      <dt>Medium:</dt>
      <dd>
        <span ng-if="!volume.emptyDir.medium">node's default</span>
        <span ng-if="volume.emptyDir.medium">{{volume.emptyDir.medium}}</span>
      </dd>
    </div>
    <div ng-if="volume.gitRepo">
      <dt>Type:</dt>
      <dd>git repo</dd>
      <dt>Repository:</dt>
      <dd>{{volume.gitRepo.repository}}</dd>
      <dt ng-if-start="volume.gitRepo.revision">Revision:</dt>
      <dd ng-if-end>{{volume.gitRepo.revision}}</dd>
    </div>
  </dl>
</div> 
